
#import "HomeSecondViewController.h"
#import "HomeSecondTableViewCell.h"

@interface HomeSecondViewController ()

@end

@implementation HomeSecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // 1、 设置导航栏的背景图片
//    self.navigation_backgroundImageName = @"2.jpg";
    
    // 2、设置被拉伸图片view的高度
    self.stretchingImageHeight = [UIScreen mainScreen].bounds.size.height * 4 / 8;
    
    // 3、设置头部拉伸图片的名称
    self.stretchingImageName = @"2.jpg";
    
    [self.tableView registerNib:[UINib nibWithNibName:@"HomeSecondTableViewCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"HomeSecondTableViewCell"];
    

    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"返回"] style:UIBarButtonItemStylePlain target:self action:@selector(leftBtnClick)];
    
}

#pragma mark 返回按钮方法
-(void)leftBtnClick {
    NSLog(@"leftClick");
    
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark 点击cell的方法
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
    
    NSLog(@"点击cell的方法");
}

#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return 10;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return [UIScreen mainScreen].bounds.size.height / 8;
}

#pragma mark 设置cell
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    HomeSecondTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"HomeSecondTableViewCell" forIndexPath:indexPath];
    
    
    
    
    return cell;
}






//-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
//{
//    return [UIScreen mainScreen].bounds.size.height * 4 / 8;
//}




@end
